package subject_set.weekly_competition.day10_23;

/**
 * @author haomin
 * @date 2022/10/23 10:23
 **/
public class Num1 {
    //["14:13","22:08"]
    //["02:40","08:08"]

    public static void main(String[] args) {
        System.out.println(haveConflict(new String[]{"14:13", "22:08"}, new String[]{"02:40", "08:08"}));
    }
        public static boolean haveConflict(String[] event1, String[] event2) {
            int[] data1 = new int[2];
            int[] data2 = new int[2];
            data1[0] = Integer.parseInt(event1[0].substring(0,2) + event1[0].substring(3, 5));
            data1[1] = Integer.parseInt(event1[1].substring(0,2) + event1[1].substring(3, 5));
            data2[0] = Integer.parseInt(event2[0].substring(0,2) + event2[0].substring(3, 5));
            data2[1] = Integer.parseInt(event2[1].substring(0,2) + event2[1].substring(3, 5));

            System.out.println(data1[0] + " "+data1[1]+ " " +data2[0] + " "+data2[1] );
            if(data1[1] < data2[0] || data2[1] < data1[0]) return false;
            return true;
        }
}